<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp" %>
<!DOCTYPE HTML>
<html ng-app>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <META HTTP-EQUIV="pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
    <title>${title}</title>
    <%@ include file="/WEB-INF/jsp/commons/meta.jsp" %>
    <link href="${ctx}/resources/new/style.css" type="text/css" rel="stylesheet"/>

</head>
<body>
<script>
    $(document).ready(function () {
        //聚焦第一个输入框
        $("#name").focus();

        $(".datepicker").datepicker({
            dateFormat: "yy-mm-dd",
            monthNames: [ "- 01月", "- 02月", "- 03月", "- 04月", "- 05月", "- 06月", "- 07月", "- 08月", "- 09月", "- 10月", "- 11月", "- 12月" ],
            showMonthAfterYear: true
        });
        //为inputForm注册validate函数
        $("#inputForm").validate({
            rules: {
                customer: "required",
                interview: "required",
                coBrand: "required",
                area: "required",
                monthPinTarget: "required",
                monthNewConsumerTarget: "required",
                visitDate: "required",
                /* 				displayLocation : "required",
                 salesNumber : "required",
                 helpSell : "required",
                 hasPromotion : "required",
                 promotionContent : "required",
                 hasTraining : "required",
                 trainingContent : "required",
                 hasSystem : "required",
                 firstCompetProduct : "required",
                 firstCompetProductPromotion : "required",
                 secondCompetProduct : "required",
                 secondCompetProductPromotion : "required",
                 todayVisitFocus : "required",
                 actualresult : "required",
                 visitedSummarize : "required",
                 nextTimeFocus : "required",
                 originalPicture : "required",
                 competPicture : "required",
                 clerkUser : "required",
                 dynamicSalesNumber : "required",
                 lastNewConsumerNumber : "required",
                 displaySurface : "required",
                 distributionOpportunity : "required",
                 hasUsedSysytem : "required",
                 firstCompetPlace : "required",
                 secondCompetPlace : "required",
                 leaveShopPicture : "required", */
                memo: "required"
            }
        });
    });
</script>
<form:form id="inputForm" class="well form-inline" action="${ctx}/adoms/customerInterviewDetail/save"
           modelAttribute="customerInterviewDetail" method="POST">
    <form:hidden path="id"/>
    <table class="table table-striped table-bordered table-condensed">
        <thead>
        <i class="icon-flag"></i>
        <strong>客户回访详情信息表单</strong>
        </thead>
        <tr>
            <td class="span2">客户名称:</td>
            <td><form:input path="customer"/></td>
        </tr>
        <tr>
            <td>所属记录:</td>
            <td><form:select path="interview.id">
                <c:forEach items="${interviews}" var="row">
                    <form:option value="${row.id}">${row.department.name}采访${row.customer.name}</form:option>
                </c:forEach>
            </form:select></td>
        </tr>
        <tr>
            <td>合作品牌:</td>
            <td><form:select path="coBrand.id">
                <form:options items="${brands}" itemLabel="name" itemValue="id" size="30" maxlength="80"/>
            </form:select></td>
        </tr>
        <tr>
            <td>区域:</td>
            <td><form:input path="area" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>本月动销目标:</td>
            <td><form:input path="monthPinTarget" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>本月新客目标:</td>
            <td><form:input path="monthNewConsumerTarget" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>陈列位置:</td>
            <td><form:input path="displayLocation" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>分销数:</td>
            <td><form:input path="salesNumber" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>助销:</td>
            <td><form:input path="helpSell" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>是否有促销活动:</td>
            <td>
                <form:radiobutton path="hasPromotion" label="是" value="true"/>
                <form:radiobutton path="hasPromotion" label="否" value="false"/>
            </td>
        </tr>
        <tr>
            <td>促销活动内容:</td>
            <td><form:input path="promotionContent" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>当日是否培训:</td>
            <td>
                <form:radiobutton path="hasTraining" label="是" value="true"/>
                <form:radiobutton path="hasTraining" label="否" value="false"/>
            </td>
        </tr>
        <tr>
            <td>培训内容:</td>
            <td><form:input path="trainingContent" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>是否安装系统:</td>
            <td>
                <form:radiobutton path="hasSystem" label="是" value="true"/>
                <form:radiobutton path="hasSystem" label="否" value="false"/>
            </td>
        </tr>
        <tr>
            <td>第一竞品:</td>
            <td><form:input path="firstCompetProduct" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>第一竞品促销活动:</td>
            <td><form:input path="firstCompetProductPromotion" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>第二竞品:</td>
            <td><form:input path="secondCompetProduct" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>第二竞品促销活动:</td>
            <td><form:input path="secondCompetProductPromotion" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>今日拜访重点:</td>
            <td><form:input path="todayVisitFocus" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>实际达成情况:</td>
            <td><form:input path="actualresult" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>拜访总结:</td>
            <td><form:input path="visitedSummarize" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>下次拜访重点:</td>
            <td><form:input path="nextTimeFocus" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>进店时陈列照片:</td>
            <td><form:input path="originalPicture" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>竞品陈列照片:</td>
            <td><form:input path="competPicture" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>业务员:</td>
            <td><form:input path="clerkUser" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>拜访日期:</td>
            <td><form:input path="visitDate" size="30" maxlength="80" cssClass="datepicker"/></td>
        </tr>
        <tr>
            <td>截止当日动销数:</td>
            <td><form:input path="dynamicSalesNumber" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>截止当日新客数:</td>
            <td><form:input path="lastNewConsumerNumber" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>陈列面位:</td>
            <td><form:input path="displaySurface" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>分销机会:</td>
            <td><form:input path="distributionOpportunity" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>是否使用系统:</td>
            <td>
                <form:radiobutton path="hasUsedSysytem" label="是" value="true"/>
                <form:radiobutton path="hasUsedSysytem" label="否" value="false"/>
            </td>
        </tr>
        <tr>
            <td>第一竞品陈列位:</td>
            <td><form:input path="firstCompetPlace" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>第二竞品陈列位:</td>
            <td><form:input path="secondCompetPlace" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>离店时陈列照片:</td>
            <td><form:input path="leaveShopPicture" size="30" maxlength="80"/></td>
        </tr>
        <tr>
            <td>备注:</td>
            <td><form:textarea path="memo" rows="4" class="span6"/></td>
        </tr>
        <tr>
            <td colspan="2">
                <input class="btn" type="submit" value="提交"/>
                &nbsp;
                <input class="btn" type="button" value="返回" back="back" onclick="history.go(-1)"/>
            </td>
        </tr>
    </table>
</form:form>
</body>
</html>